<?php
namespace Core;

class Loader extends Base {

    public $paths = [];

    function loadClass($class) {
        foreach ($this->paths as $k=>$v) {
            if(substr($class,0,strlen($k)) == $k) {
                $file = $v.str_replace('\\','/',substr($class,strlen($k))).'.php';
                var_dump($file);
                if(file_exists($file)) {
                    require $file;
                }
                break;
            }
        }
    }
}